package mystack;
/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lenovo
 * Date: 2024-07-18
 * Time: 21:13
 */
public class Test2 {
    public static void main(String[] args) throws EmptyException {
        MyStack mystack = new MyStack();
        try {
            System.out.println(mystack.peek());
        }catch (EmptyException e){
            System.out.println("栈里面没有元素！");
        }
        mystack.push(1);
        System.out.println(mystack.peek());
    }
}
